/* eslint-disable implicit-arrow-linebreak */
import axios from 'axios'

const service = axios.create({
  baseURL: import.meta.env.VITE_BASE_URL,
  timeout: 3 * 60 * 1000,
  headers: { 'Content-Type': 'application/json' }
})

// 请求拦截器
service.interceptors.request.use(config => config, error =>
  // 对请求错误做些什么
  Promise.reject(error))

// 响应拦截器
service.interceptors.response.use(response => response, error => Promise.reject(error))

export default service
